import { Response } from "../interface/response.interface";

export class ResponseUtils {
  static success<T>(data: T, msg = "success"): Response<T> {
    return {
      code: 0,
      msg,
      data
    };
  }
  static error(msg = "error"): Response<null> {
    return {
      code: -1,
      msg,
      data: null
    };
  }
}
